#ifndef N_GUIWINDOWSLIDER_H
#define N_GUIWINDOWSLIDER_H
//----------------------------------------------------------------------------
/**
    @class nguiwindowslider
    @ingroup 
    @brief a brief description of the class
    
    (c) 2007    Sergio Lora Garcia
*/
//----------------------------------------------------------------------------

#include "gui/nguiwindow.h"
#include "gui/nguilabel.h"

//----------------------------------------------------------------------------
class nguiwindowslider : public nGuiWindow
{
    public:
        /// constructor
        nguiwindowslider();
        /// destructor
        virtual ~nguiwindowslider();
				/// render the window and all contained widgets
				virtual bool Render();
				/// handle mouse move
		    virtual bool OnMouseMoved(const vector2& mousePos);
				/// set the rectangle when mouseOver is false
				virtual void SetHideRect(const rectangle& r);
				/// get the rectangle when mouseOver is false
				virtual const rectangle& GetHideRect() const;
				/// set the rectangle when mouseOver is true
				virtual void SetShowRect(const rectangle& r);
				/// get the rectangle when mouseOver is true
				virtual const rectangle& GetShowRect() const;
				/// set the slide rate for the window slider
				virtual void SetSlideRate(const float sr);

protected:

    nString closeCommand;
    nString escapeCommand;
    nClass* windowClass;
    
    bool modal;
    bool dismissed;
    bool closeRequested;

    bool openFirstFrame;
    nTime fadeInTime;
    nTime fadeOutTime;
    nTime openedTime;
    nTime closeRequestTime;
    vector4 windowColor;
		bool mouseOver;
		rectangle hideRect;
		rectangle showRect;
		float slideRate;
		double time;
};

inline
void
nguiwindowslider::SetHideRect(const rectangle& r)
{
	this->hideRect.set(r.v0,r.v1);
}

inline
const rectangle&
nguiwindowslider::GetHideRect() const
{
	return this->hideRect;
}

inline
void
nguiwindowslider::SetShowRect(const rectangle& r)
{
	this->showRect.set(r.v0,r.v1);
}

inline
const rectangle&
nguiwindowslider::GetShowRect() const
{
	return this->showRect;
}

inline
void
nguiwindowslider::SetSlideRate(const float sr)
{
	this->slideRate = sr;
}

//----------------------------------------------------------------------------
#endif // N_GUIWINDOWSLIDER_H

